package com.ruoyi.web.wrapper;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.laiqianba.enums.AccountTypeEnum;
import com.ruoyi.common.wrapper.BaseControllerWrapper;

import java.util.List;
import java.util.Map;

public class AccountInfoWrapper extends BaseControllerWrapper {

    public AccountInfoWrapper(Map<String, Object> single) {
        super(single);
    }

    public AccountInfoWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    @Override
    public void wrapTheMap(Map<String, Object> map) {

        try {
            //类型
            String type = (String) map.get("type");
            if (StrUtil.isNotEmpty(type)){
                map.put("typeStr", AccountTypeEnum.getNameByValue(type));
            }
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
